import React from "react";
import { css } from "@emotion/core";
import { useTheme } from "emotion-theming";
//第一种方式获取
const themeColor = props => css`
    color:${props.colors.primary}
`

export default function CssTheme() {
    //第二种方式获取
    const theme = useTheme()
    console.log(theme) 
    return (
        <>
            <div css={themeColor}>向css属性传递一个函数</div>
            <div css={{fontSize: theme.font}}>使用钩子函数</div>
        </>
        
    )
}